Skip to content

Start the editor at the data's extent, and choose imagery that covers it - #182

Merged
jeffmaki merged 4 commits into
developfrom
editor-start-at-data-extent
Oct 30, 2026
Merged

jeffmaki merged 4 commits into
developfrom
editor-start-at-data-extent

Conversation

@jeffmaki

@jeffmaki jeffmaki commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Makes the editors open somewhere useful, and stops black tiles when imagery covers only part of a workspace.

Start at the data's extent

  • With no #map= in the URL, the editors opened at zoom 2 over 0,0. The page now fetches the workspace's bbox and puts a location that fits it in the URL before the editor loads, so it works for Rapid 2, Rapid 3 and the Pathways editor.
  • A location in the URL is kept. An empty workspace or a failed lookup keeps the editor's default. The rest of the hash, such as background=, is kept.

Background imagery order
The background was chosen by what covered the middle of the view, so local imagery covering part of a workspace could win and leave the rest black (King County ortho on Sound Transit: tiles outside the county return HTTP 400 or solid black). It now comes from, in order:

  1. background= in the URL, if it covers the center of the view.
  2. The user's saved pick for this workspace, if it covers the center of the view. Partial coverage is fine because they chose it.
  3. Our pick, only from sources covering the whole extent (nine points across the bbox): the current imagery, then the area's best, then the first. Worldwide sources count as full coverage.
  4. If nothing covers the whole extent, what covers the center of the view.

Picks are saved per workspace in the browser's local storage, from the Background pane only, so they don't follow a user to another computer.

Known limitation: Rapid doesn't draw workspace data below zoom 12, so a workspace that only fits at a lower zoom opens showing the area but none of its data until you zoom in.

Testing

  • Tried on Stage in real Rapid 3: Sound Transit now chooses Bing Aerial instead of King County ortho.
  • Not yet tried in real Rapid: picks sticking across loads, start at extent, and Rapid 2. These have unit and e2e tests against fake editors.
  • Lint and all unit tests pass. In e2e, everything passed except the two sign-in tests that hard-code localhost:3000, because the suite ran on port 3100 beside a dev server; CI's run on 3000 is the full check.

🤖 Generated with Claude Code

jeffmaki and others added 3 commits October 30, 2026 11:41
With no map location in the URL, the editors opened at zoom 2 over 0,0.
Fetch the workspace's bbox first and put a location that fits it in the
URL for the editor to start from. A location already in the URL is kept,
and an empty workspace or a failed lookup keeps the editor's default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The background was chosen by what covers the middle of the view, so local
imagery covering only part of a workspace could win and leave the rest of
it black. Check imagery against points across the workspace's extent, and
prefer what covers all of them, falling back to the old choice when
nothing does or the extent can't be fetched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Background imagery now comes from, in order: the URL's background=, the
imagery the user last picked for this workspace in this browser, then our
pick from imagery covering the whole workspace. A URL or saved choice only
has to cover the center of the view, so a deliberate partial-coverage
choice like county imagery stays. Adding a start location to the URL also
keeps the rest of its hash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 30, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 46 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 44f1f1cd-5e97-4198-bd1b-d1eb075f0b91
Commits

Reviewing files that changed from the base of the PR and between 42d5654 and 9f5fa15.

Files selected for processing: 6
  • pages/workspace/[id]/edit.vue
  • test/e2e/edit.spec.ts
  • test/unit/util/osm.test.ts
  • test/unit/util/rapid-background.test.ts
  • util/osm.ts
  • util/rapid-background.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Choosing a background now fetches the workspace's extent, so these tests
loaded services/index, whose caches open IndexedDB. The rejections failed
the run even though the tests passed. Stub the client they need.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeffmaki
jeffmaki merged commit 7b9f606 into develop Oct 30, 2026
1 check passed
@jeffmaki
jeffmaki deleted the editor-start-at-data-extent branch October 30, 2026 16:57
jeffmaki added a commit that referenced this pull request Oct 30, 2026
Follow-up to #182, whose branch got this commit just after it merged.

Custom imagery declares no coverage, so #182's check treated it as
worldwide. A custom layer chosen on one workspace then followed the user
into workspaces it doesn't cover, and left them black.

- **We never pick custom imagery.** Only someone choosing it for that
workspace, or a `background=` in the URL, can show it. A new workspace
resets to imagery covering its whole extent.
- **A custom pick keeps its own template.** Rapid has one custom slot,
so setting a different custom URL on another workspace would otherwise
change this one.
- **`CLAUDE.md`** gets a "Background imagery" section with the order for
choosing imagery.

A custom layer chosen for a workspace always sticks there, since we
can't tell whether it covers the area.

**Testing:** only against fake imagery, not real Rapid. Lint, the type
check and unit tests pass with CI's commands. In e2e, everything passed
except the two sign-in tests that hard-code `localhost:3000`, because
the suite ran on port 3100 beside a dev server; CI's run on 3000 is the
full check.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@shweta2101 shweta2101 mentioned this pull request Nov 10, 2026
12 tasks
shweta2101 added a commit that referenced this pull request Nov 10, 2026
## Summary

Promote the current `staging` release to `production`.

This release introduces comprehensive GTFS Pathways editing in Rapid 3,
workspace merging with conflict resolution, expanded review workflows,
improved workspace creation permissions, and imagery enhancements
including Panoramax support. It also consolidates frontend API usage,
updates core dependencies, and improves deployment caching, loading, and
error reporting.

## Changes

### Features

- Added GTFS Pathways editing in Rapid 3, including:
  - Station and level navigation, editing, ordering, and validation.
- GTFS reference checking, connectivity rules, severity reporting, and
required-field validation.
  - POSM GeoJSON ZIP imports and GTFS Pathways exports.
  - TDEI export using the source dataset and agency GTFS feed.
  - Reference drawings displayed beneath map data.
  - Pathways review support in Rapid 3.
  - Related work: #155, #159, #163, #164, #167.
- Added workspace merging with:
  - Eligible target selection.
  - Three-way element merging.
  - Conflict detection and resolution.
  - Reference repair and merge validation.
  - Interactive conflict maps and details.
  - Related work: #145.
- Expanded review workflows:
  - Display open `fixme` items in the review queue.
  - Resolve TDEI dataset feedback directly from the review page.
  - Load every page of dataset feedback.
  - Related work: #158, #161, #165.
- Added Panoramax street-level imagery support (#185).
- Improved background imagery selection so it respects workspace
coverage, persists user selections, and starts the editor at the
workspace data extent (#168, #182, #183).
- Added project-group and role-based workspace creation checks, matching
backend creation rules (#154, #174, #180).
- Added selected-workspace TDEI metadata to the dashboard (#176).

### Bug fixes

- Prevented repeated authentication retries when Rapid receives OSM API
authorization failures (#157).
- Fixed GTFS Pathways level ordering, missing-level warnings, unresolved
references, export IDs, and multi-outline level handling.
- Stopped incorrectly flagging two-way escalators during Pathways
validation (#162).
- Fixed dashboard behavior for workspaces without map data (#160).
- Persisted dashboard project-group selection per user and corrected the
members-tab message shown to non-POC users (#186).
- Improved workspace creation rollback when OSM provisioning fails.
- Preserved selected imagery and custom imagery templates across
workspace changes.
- Improved editor loading and failure feedback (#172).

### Maintenance

- Consolidated workspace requests onto the primary API and removed
`VITE_NEW_API_URL` (#175).
- Updated core dependencies, including:
  - MapLibre GL 5 → 6.
  - Nuxt 4.4 → 4.6.
  - Vue and DOMPurify patch updates.
  - Related dependency updates: #170, #171.
- Added explicit deployment environment values for Sentry and filtered
non-actionable development and network errors (#177).
- Added an immediate SPA loading screen and long-lived caching for
hashed Nuxt assets while keeping build manifests uncached (#179).
- Added substantial unit and end-to-end coverage for Pathways, workspace
merging, creation permissions, review feedback, imagery, dashboard
selection, and API lifecycle behavior.

## Deployment considerations

- **API compatibility:** Production must expose the unified workspace
API routes used by this release, including workspace creation checks,
merge operations, workspace fixmes, and related lifecycle endpoints.
- **Configuration change:** `VITE_NEW_API_URL` is no longer used.
`VITE_API_URL` must point to the production API containing the
consolidated endpoints.
- **Editor configuration:** Verify the production `VITE_RAPID3_URL` and
Pathways-related service URLs before deployment.
- **Sentry:** The deployment workflow now sets `ENV=production`, which
is used as the Sentry environment.
- **Caching:** Hashed `/_nuxt/*` assets are cached for one year, while
build manifests remain uncached. Confirm Azure Static Web Apps applies
the updated routing configuration.
- **Dependency risk:** MapLibre GL is upgraded across a major version;
production map rendering should receive focused smoke testing.
- **Database migrations:** None identified in this frontend repository.
- Production has one unique previous release merge commit (#156), but
its tree matches the previous staging release; no separate
production-only code changes were identified.

## Testing

Tests were added or updated throughout this release, but no test
commands were executed while preparing this PR summary.

- [ ] Run `npm run typecheck`.
- [ ] Run `npm test`.
- [ ] Run the relevant Playwright end-to-end suite.
- [ ] Verify GTFS Pathways import, editing, validation, and export to
TDEI.
- [ ] Verify workspace merge target selection, conflict resolution, and
completion.
- [ ] Test workspace creation as POC, data generator, administrator, and
unauthorized users.
- [ ] Verify review fixmes and TDEI feedback resolution.
- [ ] Verify Rapid authentication recovery after an expired or rejected
session.
- [ ] Verify workspace map extent, custom imagery persistence, and
Panoramax imagery.
- [ ] Smoke-test dashboard project-group persistence and workspace
metadata.
- [ ] Verify production map rendering after the MapLibre GL upgrade.
- [ ] Confirm SPA loading, static asset caching, and Sentry production
reporting.

## Rollback

Redeploy the previous production commit, `9612488`, if frontend issues
are found.

Because this release depends on consolidated backend endpoints and
updated editor behavior, coordinate the rollback with any related
backend or Rapid deployments if those services were changed for this
release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant